<!DOCTYPE html>
<!--[if IE 8]>
<html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]>
<html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="zh" xmlns:th="http://www.w3.org/1999/xhtml">
<!--[endif]-->
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <script th:src="@{/static/scripts/flat-ui.js}"></script>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <link rel="shortcut icon" th:href="@{/static/image/favicon.ico}" type="image/x-icon"/>
    <meta charset="UTF-8">
    <title>茶叶溯源管理系统</title>
    <script th:src="@{/static/js/jquery-3.3.1.min.js}"></script>
    <link th:href="@{/static/css/bootstrap.min.css}" rel="stylesheet">
    <link th:href="@{/static/css/flat-ui.css}" rel="stylesheet">
    <script th:src="@{/static/scripts/flat-ui.min.js}"></script>
    <script th:src="@{/static/scripts/particles.js}"></script>
    <link th:href="@{/static/css/animate.css}" rel="stylesheet">
    <link href="https://www.layuicdn.com/layui/css/layui.css" rel="stylesheet">
</head>

<body>
<div id="particles-js">
    <canvas class="particles-js-canvas-el" width="1322" height="774" style="width: 100%; height: 100%;"></canvas>
</div>

<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo layui-hide-xs layui-bg-black"> 茶叶管理系统</div>
        <!-- 头部区域（可配合layui 已有的水平导航） -->
        <ul class="layui-nav layui-layout-left">
            <!-- 移动端显示 -->
            <li class="layui-nav-smallproduct layui-show-xs-inline-block layui-hide-sm" lay-header-event="menuLeft">
                <i class="layui-icon layui-icon-spread-left"></i>
            </li>

<!--            <li class="layui-nav-smallproduct layui-hide-xs"><a href="">nav 1</a></li>-->
            <li class="layui-nav-smallproduct layui-hide-xs"><a href="/product/productList/1">产品管理</a></li>
            <li class="layui-nav-smallproduct layui-hide-xs"><a href="/product/toAddPage">添加产品</a></li>
        </ul>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-smallproduct layui-hide layui-show-md-inline-block">
                <a href="javascript:;">
                    <span th:text="${session.adminName}"></span>
                </a>
            </li>
            <li class="layui-nav-smallproduct layui-hide layui-show-md-inline-block">
                    <a href="/logout">退出</a>

            </li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree" lay-filter="test">
                <li class="layui-nav-smallproduct layui-nav-smallproducted">
                <a class="" href="javascript:;">产品管理手册</a>
                <dl class="layui-nav-child">
                    <dd><a href="https://baike.baidu.com/smallproduct/%E7%BA%A2%E8%8C%B6/185424?fr=aladdin">红茶</a></dd>
                    <dd><a href="https://baike.baidu.com/smallproduct/%E4%B9%8C%E9%BE%99%E8%8C%B6/1072?fr=aladdin">乌龙茶</a></dd>
                    <dd><a href="https://baike.baidu.com/smallproduct/%E7%BB%BF%E8%8C%B6/13497">绿茶</a></dd>
                    <dd><a href="https://baike.baidu.com/smallproduct/%E8%8C%89%E8%8E%89%E8%8A%B1%E8%8C%B6/1173">茉莉花茶</a></dd>
                </dl>
                </li>
                <li class="layui-nav-smallproduct">
                    <a href="javascript:;">系统操作手册</a>
                    <dl class="layui-nav-child">
                        <dd><a href="http://www.360doc.com/content/11/1109/12/7082867_163014077.shtml">茶叶管理技术</a></dd>
                        <dd><a href="https://baike.baidu.com/smallproduct/%E8%8C%B6%E5%8F%B6%E5%82%A8%E5%AD%98/1124618?fr=aladdin">茶叶存储</a></dd>
                    </dl>
                </li>
            </ul>
        </div>
    </div>

    <div class="layui-body">
        <!-- 内容主体区域 -->
        <div class="container">
            <div class="row">
                <div class="col-md-12">
                </div>
                <div class="col-md-12">
                    <div class="row">
                        <div class="col-md-12">
                            <div class="margin:0 15px">
                                <table class="layui-table">
                                    <colgroup>
                                        <col width="150">
                                        <col width="200">
                                        <col>
                                    </colgroup>
                                    <thead>
                                    <tr>
                                        <th>单品编码</th>
                                        <th>销售状态</th>
                                        <th>销售时间</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr th:each="smallproduct : ${smallproductList}">
                                        <td th:text="${smallproduct.smallproductCode}"></td>
                                        <td th:if="${smallproduct.getSmallStatus == 0}">未销售</td>
                                        <td th:if="${smallproduct.getSmallStatus == 1}">已销售</td>
                                        <td th:if="${smallproduct.getSmallStatus == 0}">暂未销售</td>
                                        <td th:if="${smallproduct.getSmallStatus == 1}">
                                            <span th:text="${#dates.format(smallproduct.saleTime,'yyyy-MM-dd HH:mm:ss')}"></span>
                                        </td>
                                    </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script>
    //JS
    layui.use(['element', 'layer', 'util'], function(){
        var element = layui.element
            ,layer = layui.layer
            ,util = layui.util
            ,$ = layui.$;

        //头部事件
        util.event('lay-header-event', {
            //左侧菜单事件
            menuLeft: function(othis){
                layer.msg('展开左侧菜单的操作', {icon: 0});
            }
            ,menuRight: function(){
                layer.open({
                    type: 1
                    ,content: '<div style="padding: 15px;">处理右侧面板的操作</div>'
                    ,area: ['260px', '100%']
                    ,offset: 'rt' //右上角
                    ,anim: 5
                    ,shadeClose: true
                });
            }
        });
    });
</script>
<script src="https://www.layuicdn.com/layui/layui.js"></script>
</body>

</html>
